<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateReceivingAddressTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('receiving_address', function (Blueprint $table) {
          $table->charset = 'utf8';
          $table->collation = 'utf8_general_ci';
          $table->increments('id');
          $table->integer('user_id')->nullable(true)->comment("填地址者id");
          $table->string('name',255)->comment("收货者姓名");
          $table->string('phone_number',255)->comment("收货手机号");
          $table->string('email',255)->comment("常用邮箱");
          $table->string('region',255)->comment("送货地区");
          $table->string('detailed_address',255)->comment("详细地址");
          $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('receiving_address');
    }
}
